const api = require('../utils/request.js')

module.exports = {
  // 获取营地列表
  campList(data) {
    return api.request({
      url: '/wechat/camp/list',
      method: 'get',
      data
    })
  },
  // 删除营地
  deleteCamp(campId) {
    return api.request({
      url: `/wechat/camp/${campId}`,
      method: 'delete'
    })
  },
  // 获取营地详细信息
  detailCamp(id) {
    return api.request({
      url: `/wechat/camp/${id}`
    })
  },
  
  // 查询该营地的服务设施列表
  seekList(id){
    return api.request({
      url: `/wechat/facility/getInfo/${id}`
    })
  },
  // 修改营地
  modifyCamp(data) {
    return request({
      url: "/wechat/camp",
      method: "POST",
      data
    })
  },
  //营地营位添加
  addCampsite(data) {
    return api.request({
      url: '/wechat/campsite',
      method: 'post',
      data
    })
  },
  //营地营位删除
  delCampsite(campsiteid) {
    return api.request({
      url: '/wechat/campsite/' + campsiteid,
      method: 'delete'
    })
  },
  // 景点的添加
  addScenic(data) {
    return api.request({
      url: `/wechat/spots/add`,
      method: 'post',
      data
    })
  },
  // 景点的删除
  delScenic(scenicid) {
    return api.request({
      url: '/wechat/spots/delete/' + scenicid,
      method: 'delete'
    })
  },
  // 活动的添加
  addActivity(data) {
    return api.request({
      url: `/wechat/activity/add`,
      method: 'post',
      data
    })
  },
  // 活动的删除
  delActivity(activityid) {
    return api.request({
      url: '/wechat/activity/delete/' + activityid,
      method: 'delete'
    })
  },
  // 项目的添加
  addProject(data) {
    return api.request({
      url: `/wechat/project/add`,
      method: 'post',
      data
    })
  },
  // 项目的删除
  delProject(projectid) {
    return api.request({
      url: '/wechat/project/delete/' + projectid,
      method: 'delete'
    })
  },
}